﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta><style>/*<![CDATA[*/

table{border: 1px solid gray;}
td{border: 1px dotted gray;}
p{margin: 3px 0 3px 0; padding: 0;}
#ID_Footer{font-size: small; font-style: italic; text-align: right; margin-top: 4em; padding-top: 4px; border-top: 2px solid gray;}

/*]]>*/</style><title>笔记</title></head><body>
<div><span style="font-family: 微软雅黑; font-size: 12pt; font-weight: bold; color: #000000; padding-left: 21pt; line-height: 160%">1. &nbsp; &nbsp; &nbsp; &nbsp;vimrc comment</span></div>
<div><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">&quot;</span></div>
<div><span style="font-family: 微软雅黑; font-size: 10pt; font-weight: bold; padding-left: 21pt; line-height: 160%">2. &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 微软雅黑; font-size: 12pt; font-weight: bold; padding-left: 21pt; line-height: 160%">gvim &amp; vim</span></div>
<div><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">GVim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">是</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">Vim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">的图形前端，跨平台，这是一个国际版本，会根据安装的平台自动选择相应语言包，支持中文及其各种编码，连界面也是中文的。</span></div>
<div><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">Gvim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">是单独的窗口下的</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">vim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">，像</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">notepad</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">一样。</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%"> vim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">就是在黑乎乎的</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">cmd</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">窗口下的编辑器。</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">windows</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">下用</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">gvim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">最好，</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">linux</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">下那就是</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">vim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">了</span></div>
<div><span style="font-family: 微软雅黑; font-size: 11pt; font-weight: bold; padding-left: 21pt; line-height: 160%">3. &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 微软雅黑; font-size: 12pt; font-weight: bold; padding-left: 21pt; line-height: 160%">gvim, gvim easy, gvim read only</span></div>
<div><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">Windows</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">下安装</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">vim7.4(windows 10 64bit)</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">后，桌面出现</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">3</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">个快捷方式，分别是</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">gVim7.4, gVim Easy 7.4</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">和</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">gVim Read only 7.4.</span></div>
<div><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">Easy</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">启动的时候是</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">insert</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">模式，适合普通</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">windows</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">用户的习惯；</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%"> </span></div>
<div><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">Read-Only</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">的用途：比如用</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">read-only</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">打开已经用</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">vim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">打开过的文件，就不会提示让人烦躁的</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">.swp</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">文件存在的问题；比如可以用它来看</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">TXT</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">的电子书不会存在误删误改（</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">ctrl+b ctrl+f</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">很方便）</span></div>
<div><span style="font-family: Times New Roman; font-size: 11pt">Ref 1: </span><a href="http://www.zhihu.com/question/19667423" style="font-family: Times New Roman; font-size: 11pt; text-decoration: underline; color: #0000ff">http://www.zhihu.com/question/19667423</a></div>
<div><span style="font-family: 微软雅黑; font-size: 11pt; font-weight: bold; padding-left: 21pt; line-height: 160%">4. &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 微软雅黑; font-size: 12pt; font-weight: bold; padding-left: 21pt; line-height: 160%">vim 支持JavaScript编程</span></div>
<div><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">vim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">默认似乎不支持</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">js</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">库配色。</span></div>
<div><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">在</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">vimfiles\syntax</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">下放入</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">jquery.vim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">，在</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">vimrc</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">中加入如下代码：</span></div>
<div><span style="font-family: Consolas; font-size: 10pt; color: #7030a0; padding-left: 31pt; line-height: 160%"> au BufRead,BufNewFile</span><span style="font-family: Times New Roman; font-size: 10pt; color: #7030a0; padding-left: 31pt; line-height: 160%"> </span><span style="font-family: Consolas; font-size: 10pt; color: #7030a0; padding-left: 31pt; line-height: 160%">*.js set syntax=jquery</span><span style="font-family: Consolas; font-size: 9pt; color: #000000; padding-left: 31pt; line-height: 160%"> </span></div>
<div><span style="font-family: Times New Roman; font-size: 11pt">Ref 1: </span><a href="http://www.vimer.cn/2010/04/%E8%AE%A9vimgvim%E6%9B%B4%E5%A5%BD%E7%9A%84%E6%94%AF%E6%8C%81javascript%E7%BC%96%E7%A8%8B.html" style="font-family: 宋体; font-size: 11pt; text-decoration: underline; color: #0563c1">让</a><span style="font-family: Times New Roman; font-size: 11pt">Vim(gvim)</span><span style="font-family: 宋体; font-size: 11pt">更好的支持</span><span style="font-family: Times New Roman; font-size: 11pt">javascript</span><span style="font-family: 宋体; font-size: 11pt">编程</span></div>
<div><span style="font-family: Times New Roman; font-size: 11pt">Ref 2: js</span><span style="font-family: 宋体; font-size: 11pt">库配色支持下载，</span><a href="http://www.vim.org/scripts/script.php?script_id=2416" style="font-family: Times New Roman; font-size: 11pt; text-decoration: underline; color: #0000ff">http://www.vim.org/scripts/script.php?script_id=2416</a></div>
<div><span style="font-family: 微软雅黑; font-size: 11pt; font-weight: bold; padding-left: 21pt; line-height: 160%">5. &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 微软雅黑; font-size: 12pt; font-weight: bold; padding-left: 21pt; line-height: 160%">vim命令行</span></div>
<div><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">输入</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">:version</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">，可查看相关配置文件的目录及其它相关信息</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">,Linux/Windows</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">同。若要看</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">gvim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">的相关信息，得进入</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">gvim</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">后，使用同样命令。</span><span style="font-family: Times New Roman; font-size: 11pt; line-height: 160%">gvimrc</span><span style="font-family: 宋体; font-size: 11pt; line-height: 160%">配置文件默认不存在。</span></div>
<div><br /></div>
<div><span style="font-family: 宋体; font-size: 10pt; line-height: 171%">windows上gvim的配置文件_vimrc没有保存在gvim的安装目录中，而是保存在当前登录用户的目录中，例如当前用户为admin，则配置文件存储在C:/users/admin/_vimrc.set </span><span style="font-family: 宋体; font-size: 10pt; color: #000000; line-height: 171%">nobackup</span><span style="font-family: Times New Roman; font-size: 10pt; color: #0000ff; line-height: 171%"> &nbsp; &nbsp; </span><span style="font-family: 宋体; font-size: 10pt; color: #ed1c24; line-height: 171%">&quot; 不保留备份文件</span><span style="font-family: Times New Roman; font-size: 10pt; color: #0000ff; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">nocompatible </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 关闭 vi 兼容模式</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">syntax on &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 自动语法高亮</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">colorscheme blackdust </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 设定配色方案</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">number </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 显示行号</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">cursorline </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 突出显示当前行</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">filetype plugin indent on </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 开启插件</span><span style="font-family: Times New Roman; font-size: 10pt; color: #800000; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">ruler </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 打开状态栏标尺</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">tabstop=</span><span style="font-family: 宋体; font-size: 10pt; color: #800080; line-height: 171%">4</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 设定 tab 长度为 4</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">softtabstop=</span><span style="font-family: 宋体; font-size: 10pt; color: #800080; line-height: 171%">4</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 使得按退格键时可以一次删掉 4 个空格</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">shiftwidth=</span><span style="font-family: 宋体; font-size: 10pt; color: #800080; line-height: 171%">4</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 设定 &lt;&lt; 和 &gt;&gt; 命令移动时的宽度为 4</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">autochdir </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 自动切换当前目录为当前文件所在的目录</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">ignorecase smartcase </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 搜索时忽略大小写，但在有一个或以上大写字母时仍保持对大小写敏感</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">nowrapscan </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 禁止在搜索到文件两端时重新搜索</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">incsearch </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 输入搜索内容时就显示搜索结果</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">hlsearch </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 搜索时高亮显示被找到的文本</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">noerrorbells </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 关闭错误信息响铃</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">novisualbell </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 关闭使用可视响铃代替呼叫</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">t_vb= </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 置空错误铃声的终端代码</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">guioptions-=T </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 隐藏工具栏</span><span style="font-family: Times New Roman; font-size: 10pt; color: #800000; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; set guioptions-=m</span><span style="font-family: Times New Roman; font-size: 10pt; color: #000000; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #000000; line-height: 171%">隐藏菜单栏</span><span style="font-family: Times New Roman; font-size: 10pt; color: #000000; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">history=</span><span style="font-family: 宋体; font-size: 10pt; color: #800080; line-height: 171%">400</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot;记住的历史操作的数量，默认的是20</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #0000ff; line-height: 171%">set</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">autoread </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot; 当文件在外部被修改时，自动重新读取</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">vmap </span><span style="font-family: 宋体; font-size: 10pt; color: #800000; line-height: 171%">&quot;+y</span><span style="font-family: Times New Roman; font-size: 10pt; color: #464646; line-height: 171%"> </span><span style="font-family: 宋体; font-size: 10pt; color: #464646; line-height: 171%">选中状态下 Ctrl+</span><span style="font-family: 宋体; font-size: 10pt; color: #000000; line-height: 171%">c 复制</span></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><span style="font-family: 微软雅黑; font-size: 10pt; font-weight: bold; color: #000000; padding-left: 21pt; line-height: 160%">6. &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-family: 微软雅黑; font-size: 12pt; font-weight: bold; color: #000000; padding-left: 21pt; line-height: 160%">VIM command</span></div>
<div><span style="font-family: Calibri; font-size: 10pt; padding-left: 21pt">yy: copy one line</span></div>
<div><span style="font-family: Calibri; font-size: 10pt; padding-left: 21pt">p: paste on the next line</span></div>
<div><span style="font-family: 微软雅黑; font-size: 12pt; font-weight: bold; color: #000000; padding-left: 21pt; line-height: 160%">7. &nbsp; &nbsp; &nbsp; &nbsp;set font in vim last line mode</span></div>
<div><span style="font-family: Times New Roman; font-size: 10pt">In gvim, you can change the font using the Edit menu, Select Font. An alternative is to enter the command:</span></div>
<div><span style="font-family: Consolas; font-size: 9pt; color: #7030a0; padding-left: 21pt">:set guifont=*</span></div>
<div><span style="font-family: Times New Roman; font-size: 10pt">Once you have a font you like, you want to make it the default in the future. Do</span></div>
<div><span style="font-family: Consolas; font-size: 9pt; color: #7030a0; padding-left: 21pt">:set guifont?</span></div>
<div><span style="font-family: Times New Roman; font-size: 10pt">and Vim will display something like</span></div>
<div><span style="font-family: Consolas; font-size: 9pt; color: #7030a0; padding-left: 21pt">guifont=</span><span style="font-family: Calibri; font-size: 10pt; padding-left: 21pt"> </span><span style="font-family: Consolas; font-size: 9pt; color: #7030a0; padding-left: 21pt">Consolas:h14:cANSI</span></div>
<div><span style="font-family: Times New Roman; font-size: 10pt">Alternatively, enter the following to insert the current font setting into the buffer:</span></div>
<div><span style="font-family: Consolas; font-size: 9pt; color: #7030a0; padding-left: 21pt">:put =&amp;guifont</span></div>
<div><span style="font-family: Times New Roman; font-size: 10pt">Now put a line in your vimrc to set guifont to this value, like this:</span></div>
<div><span style="font-family: Consolas; font-size: 9pt; color: #7030a0; padding-left: 21pt">if has(&apos;gui_running&apos;)</span></div>
<div><span style="font-family: Consolas; font-size: 9pt; padding-left: 21pt"> &nbsp;set guifont=</span><span style="font-family: Calibri; font-size: 10pt; padding-left: 21pt"> </span><span style="font-family: Consolas; font-size: 9pt; color: #7030a0; padding-left: 21pt">Consolas:h14:cANSI</span></div>
<div><span style="font-family: Consolas; font-size: 9pt; padding-left: 21pt">endif</span></div>
<div><span style="font-family: Times New Roman; font-size: 10pt">If there is a space in the font name, such as</span></div>
<div><span style="font-family: Consolas; font-size: 9pt; color: #7030a0; padding-left: 21pt">guifont=Monospace 10</span></div>
<div><span style="font-family: Times New Roman; font-size: 10pt">it is necessary to escape the space</span></div>
<div><span style="font-family: Consolas; font-size: 9pt; color: #7030a0; padding-left: 21pt"> &nbsp; &nbsp; &nbsp; &nbsp;set guifont=Monospace\ 10</span></div>
<div><span style="font-family: Times New Roman; font-size: 10pt">Ref: </span><a href="http://vim.wikia.com/wiki/Change_font" style="font-family: Times New Roman; font-size: 10pt; text-decoration: underline; color: #0000ff">http://vim.wikia.com/wiki/Change_font</a></div>
<div><span style="font-family: 微软雅黑; font-size: 12pt; font-weight: bold; color: #000000; padding-left: 21pt; line-height: 160%">8. &nbsp; &nbsp; &nbsp; &nbsp;Create a new file in current directory (last line mode)</span></div>
<div><span style="font-family: Times New Roman; font-size: 10pt">edit *.html or split filename</span></div>
<div><br /></div>
<div><br /></div><script type="text/javascript" language="javascript" src="jquery.js"></script><script type="text/javascript" language="javascript" src="itemlink.js"></script></body></html>